package com.contextor.magiccards.model.user;

import com.contextor.magiccards.model.user.enums.UidType;

import javax.persistence.*;
import java.io.Serializable;

/**
 * User: sergey
 * Date: Mar 14, 2011 12:39:15 PM
 */
@Entity
@Table(name = "users")
public class User implements Serializable, com.contextor.magiccards.model.Entity<String> {

    @Id
    @Column(name = "uid", nullable = false)
    private String uid;

    @Column(name = "name")
    private String name;

    @Enumerated(EnumType.ORDINAL)
    @Column(name = "uid_type")
    private UidType uidType;

    @Column(name = "email")
    private String email;

    public User() {
    }

    public User(String uid) {
        this.uid = uid;
    }

    public String getUid() {
        return uid;
    }

    public String getId() {
        return uid;
    }

    public void setId(String pk) {
        this.uid = pk;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public UidType getUidType() {
        return uidType;
    }

    public void setUidType(UidType uidType) {
        this.uidType = uidType;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
